package com.atzzy.ysmall.ysmall_api.UserServiceAllController;

import com.alibaba.dubbo.config.annotation.Reference;
import com.atzzy.ysmall.ysmall_allService.UserService.UserAddrService;
import com.atzzy.ysmall.ysmall_common.vo.R;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

/**
 * @Author JAVAZeng
 * @Date 2022/4/4 15:05
 * @Version 1.0
 */
@RestController
@CrossOrigin
@RequestMapping("userAddr")
public class UserAddrController {

    @Reference
    private UserAddrService userAddrService;

    @GetMapping("userAddrById")
    public R listAddr(Integer userId, @RequestHeader("token") String token){
        R resuleVo = userAddrService.listAddrsByUid(userId);
        return resuleVo;
    }
}
